package mapper;

import entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

/**
 * @author: liyf
 * @create: 2025-02-11 22:27
 **/
public interface UserMapper {

    User selectByUserId(Integer userId);

    List<User> selectByUsername(String username);

    int insert(User user);

    int update(User user);

    int delete(Integer userId);

    int insertBatch(List<User> users);

    int deleteByIds(List<Integer> ids);

    User selectUserOrderByUserId(Integer userId);

    User selectUserOrderUseSubQueryByUserId(Integer userId);

    List<User> selectAllUser();

    List<User> selectAllUser2();

    List<User> selectAllUser3();

    List<User> selectAllUser4();

    HashMap selectById(int id);

    List<User> findByColumn(@Param("columnName") String columnName, @Param("value") String value);
}
